#include <iostream>
#include "employee.h"

//普通员工类继承职工抽象类，并重写父类中纯虚函数
//员工类
Employee::Employee(int id, string name, int deptId) {//构造函数
    this->id = id;
    this->name = name;
    this->deptId = deptId;
}

void Employee::showInfo() {//显示个人信息
    cout << "职工编号:" << this->id << ",职工姓名:" << this->name << "，岗位:" << this->getDeptName()
         << ",岗位职责：完成经理交给的任务" << endl;
}

string Employee::getDeptName() {//获取职工岗位名称
    return string("员工");
}